#include <bits/stdc++.h>
// 2025/01/22
// tag: 
// Author: Zhang Muen
using namespace std;

int n, p, a[100001], b[100001];
int64_t s;

bool check(double time){
    double cnt = 0;
    for (int i = 1; i <= n; i++)
        if (a[i] * time <= b[i])
            continue;
        else
            cnt += a[i] * time - b[i];
    return cnt <= p * time;
}

signed main()
{
    cin >> n >> p;
    for (int i = 1; i <= n; i++)
        cin >> a[i] >> b[i], s += a[i];
    if (s <= p){
        cout << -1;
        return 0;
    }
    double l = 0, r = 3e10;
    while (abs(r - l) > 1e-6){
        double mid = l + (r - l) / 2;
        if (check(mid))
            l = mid;
        else
            r = mid;
    }
    cout << l;
    return 0;
}